<template xmlns="http://www.w3.org/1999/html">
  <div class="app-container">
    <el-descriptions class="margin-top"  :column="2"  border>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-user"></i>
          活动开始时间
        </template>
        {{form.startTime}}
      </el-descriptions-item>
      <el-descriptions-item >
        <template slot="label">
          <i class="el-icon-office-building"></i>
          活动结束时间
        </template>
        {{form.endTime}}
      </el-descriptions-item>
      <el-descriptions-item >
        <template slot="label">
          <i class="el-icon-office-building"></i>
          商品名称
        </template>
        {{form.goodsName}}
      </el-descriptions-item>
      <el-descriptions-item >
        <template slot="label">
          <i class="el-icon-office-building"></i>
          库存数量
        </template>
        {{form.quantity}}
      </el-descriptions-item>

      <el-descriptions-item >
        <template slot="label">
          <i class="el-icon-office-building"></i>
          剩余活动库存
        </template>
        {{form.stock}}
      </el-descriptions-item>


      <el-descriptions-item  >
        <template slot="label">
          <i class="el-icon-office-building"></i>
          每人最低砍
        </template>
        {{form.lowestPrice}} 元
      </el-descriptions-item>

      <el-descriptions-item >
        <template slot="label">
          <i class="el-icon-office-building"></i>
          每人最高砍
        </template>
        {{form.highestPrice}} 元
      </el-descriptions-item>

      <el-descriptions-item >
        <template slot="label">
          <i class="el-icon-office-building"></i>
          结算价格
        </template>
        {{form.settlementPrice}} 元
      </el-descriptions-item>

      <el-descriptions-item >
        <template slot="label">
          <i class="el-icon-office-building"></i>
          状态
        </template>
        <dict-tag :options="dict.type.mall_promotion_state" :value="form.promotionStatus"/>
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>

<script>
import {  getKanjiaGoods } from "@/api/mall/promotion/kanjia-goods";
export default {
  name: "KanJiaGoodsView",
  dicts: ['mall_promotion_state'],
  props: {
    activityId: {
      type: String
    }
  },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 查询参数
      // 表单参数
      form: {
        freeFreightFlag: 1
      },
      coupon: [], //选择的优惠券列表
      gift: [], //选择的会员列表
    };
  },
  created() {
    this._getKanjiaGoods();
  },
  methods: {
    /** 查询商城满减活动详情 */
    _getKanjiaGoods() {
      getKanjiaGoods(this.activityId).then(response => {
        this.form = response.data.activityGoods;
      });
    },
  }
};
</script>
